import request from '@/utils/request'
// import store from '@/store'

// 封装调用发送验证码接口的函数
export const sendSms = mobile => request({
  url: `/v1_0/sms/codes/${mobile}`
})

// 封装利用手机号码和验证码调登录接口的函数
export const login = data => request({
  method: 'POST',
  url: '/v1_0/authorizations',
  data
})

// 封装调获取自己用户信息接口的函数
export const getUserInfo = () => request({
  method: 'GET',
  url: '/v1_0/user'
  // headers: {
  //   Authorization: `Bearer ${store.state.user.token}`
  // }
})
